package com.ale.oxetool.service;

import com.ale.oxetool.exceptions.BusinessException;
import com.ale.oxetool.model.Phone;

import java.io.IOException;
import java.util.List;

/**
 * Created by guoshunw on 2015/11/3.
 */
public interface PhoneService {
    List<Phone> getPhones() throws IOException;

    boolean login() throws IOException;

    String getHost(int index);

    String switchPhone(Phone phone) throws IOException;

    String switchPhoneWithoutOpenPhoneTelnet(Phone phone) throws IOException;
    String openTelnetForPhones(List<Phone> phones);

    /**
     * Switch phone which number is number to target platform
     *
     * @param targetPlatform 01/02
     * @param targetNumber   5 digit without prefix platform and site information.
     * @return success information
     */
    String switchPhone(String targetPlatform, String targetNumber) throws IOException, BusinessException;

    void closeOXEServers() throws IOException;
}
